Carbon


KCCopyItem

Header: Keychain.h Carbon status: Under Evaluation

Copies a password or other keychain item from one keychain to another.

OSStatus KCCopyItem (
    KCItemRef item, 
    KCRef destKeychain, 
    KCItemRef *copy
);
Parameter descriptions
item

A reference to the keychain item you wish to copy.

destKeychain

A reference to the keychain into which the item is to be copied.

copy

A pointer to a reference to the new copied keychain item.

function result

A result code. The result code errKCReadOnly indicates that the destination keychain is read only. The result code errKCNoSuchClass indicates that the item has an invalid keychain item class. The result code errKCInvalidItemRef indicates that the specified keychain item reference was invalid.

DISCUSSION

You can use the KCCopyItem function to copy a keychain item from one keychain to another. KCCopyItem will automatically call the function KCUnlock to display the Unlock Keychain dialog box if the keychain containing the item to be copied is currently locked.

VERSION NOTES

Available beginning with Keychain Manager 2.0.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)